export class CopyUtils {
  static copy(text: string) {
    const input = globalThis.document.createElement('input')
    input.value = text
    input.style.position = 'absolute'
    input.style.opacity = '0'
    input.style.left = '-9999px'
    globalThis.document.body.appendChild(input)
    input.focus()
    input.select()
    globalThis.document.execCommand('copy')
    input.blur()
    globalThis.document.body.removeChild(input)
  }
}
